<% var user = shiro.getPrincipal(); %>
<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="sidebar-collapse">
        <ul class="nav metismenu" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element">
                    <span>
                           <a href="${ctxPath}/admin/main">
                               <img alt="后台首页" title="后台首页" src="${ctxPath}/static/images/logo.png"/>
                           </a>
                    </span>
                    <div class="btn-group userDropdown">
                        <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle ">&emsp;${user.userName!"登录超时"}&emsp;<span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="${ctxPath}/adminUser/view/index">账号管理</a></li>
                            <li class="divider"></li>
                            <li><a href="${ctxPath}/admin/logout">退出登陆</a></li>
                        </ul>
                    </div>
                </div>
                <div class="logo-element">YGY</div>
            </li>
            ${strutil.contain(request.requestURI,'/admin/main')?"<li class=active>":"<li>"}
            <a href="${ctxPath}/admin/main"><i class="fa fa-tachometer" aria-hidden="true"></i>
                <span class="nav-label">后台首页</span>
            </a>
        </li>

            <#menuList status="1";menuList>
               <% for(nav in menuList!){
                if(shiro.hasPermission(nav.url)){ %>
                ${strutil.contain(request.requestURI,nav.url) && !strutil.contain(request.requestURI,"admin/main")?"<li class=active>":"<li>"}
                <a href="${nav.url}"><i class="fa ${nav.iconCls}"></i>
                    <span class="nav-label">${nav.text}</span> <span class="fa arrow"></span>
                </a>
                <ul class="nav nav-second-level collapse">
                    <% for(childNav in nav.children){
                     if(shiro.hasPermission(childNav.url)){ %>
                    ${webUtil.menuContains(childNav.url,request.requestURI)?"<li class=active>":"<li>"}
                        <a href="${ctxPath}${childNav.url}"><i class="fa fa-angle-double-right"></i>${childNav.text}</a>
                    </li>
                    <% }
                     } %>
                </ul>
                </li>
                <% }
                    } %>
            </#menuList>
            <li>
                <a href="#"><i class="fa fa-user-circle"></i> <span class="nav-label">关于我们</span></a>
            </li>
            </li>
        </ul>
    </div>
</nav>